package org.example.pet.util;

import lombok.extern.slf4j.Slf4j;
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;

@Slf4j
@SpringBootTest
public class UtilsTest {
    @Autowired
    private SMSUtils smsUtils;
    
    @Test
    public void testSendEmail() {
        String toEmail = "2358873178@qq.com";
        String username = "wjc";
        try {
            smsUtils.sendRegNotifyMail(toEmail, username);
            log.info("邮件发送成功：{}", toEmail);
        } catch (Exception e) {
            log.error("邮件发送失败：{}", toEmail);
        }
    }
}
